<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
		<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
		<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
		<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
		<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
		<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
		<script>var weburl = '{yun:}$config.sy_weburl{/yun}';</script>
		<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
		<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}"></script>
		<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
		<script language="javascript">

			function checkform(){
				if($("#title").val()=="") { 
					parent.layer.msg('请填写招聘会标题！', 2, 8);
					return (false);
				  }		
				var time = $("#time").val();
				if(time==""){
					parent.layer.msg('举办时间不能为空！', 2, 8);
					return false
				}
				$("#zphform").submit();
			}
			function news_preview(url){
				$(".job_box_div").html("<img src='"+url+"' style='max-width:500px' />");//
				$.layer({
					type : 1,
					title : '查看图片',
					closeBtn : [0 , true],
					offset : ['20%' , '30%'],
					border : [10 , 0.3 , '#000', true],
					area : ['560px','auto'],
					page : {dom : '#news_preview'}
				}); 
			}
		</script>

		<style>
			* {margin: 0 ;padding: 0;}
			body,div{ margin: 0 ;padding: 0;}
			.layui-form-item {margin-bottom: 0px;clear: both;}
			.layui-form-label {width: 60px;padding: 9px 1px;}
		</style>
		<title>后台管理</title>
		<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.config.js?v={yun:}$config.cachecode{/yun}"></script>
		<script src="{yun:}$config.sy_weburl{/yun}/js/ueditor/ueditor.all.min.js?v={yun:}$config.cachecode{/yun}"></script>
	</head>
	<body class="body_ifm">
		<div class="infoboxp">

			<div class="admin_new_tip">
				<a href="javascript:;" class="admin_new_tip_close"></a>
				<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
				<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
				<div class="admin_new_tip_list_cont">
					<div class="admin_new_tip_list">管理员根据自己需求，填写该场招聘会常规设置！招聘会名称、日期、参与说明等设置</div>
				</div>
			</div>
			<div class="clear"></div>

			<div class="tag_box mt10">
				<iframe id="supportiframe" name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
				<form id="zphform" name="myform" target="supportiframe" action="index.php?m=admin_zphnet&c=save" method="post" encType="multipart/form-data" class="layui-form" autocomplete="off">
					<table width="100%" class="table_form" style="background:#fff;">
						<tr class="admin_table_trbg">
							<th colspan="4" bgcolor="#f0f6fb"><span class="admin_bold">添加招聘会信息</span></th>
						</tr>
						<tr>
							<th width="120">招聘会标题：</th>
							<td>
								<div class="layui-form-item">
									<div class="layui-input-block">
										<div class="layui-input-inline">
											<input type="text" name="title" id="title" lay-verify="required" placeholder="请输入招聘会标题" value="{yun:}$info.title{/yun}" size="60" class="layui-input input-text">
										</div>
									</div>
								</div>
							</td>
						</tr>
						<tr>
							<th>使用范围：</th>
							<td><input type="button" value="{yun:}if $info.did{/yun}{yun:}$Dname[$info.did]{/yun}{yun:}else{/yun}总站{yun:}/if{/yun}"
								 class="city_news_but" onClick="add_site('{yun:}$info.did{/yun}','{yun:}$Dname[$info.did]{/yun}');">
								<input id="did" type="hidden" name="did" value="{yun:}$info.did{/yun}" />
							</td>
						</tr>
						<tr>
							<th>展会区域：</th>
							<td>
								<div class="layui-form-item">
									<div class="layui-input-inline">
										<select name="zw" lay-filter="zw">
											<option value="0">请选择</option>
											{yun:}foreach from=$class item=v{/yun}
											<option value="{yun:}$v.id{/yun}" {yun:}if $info.zw==$v.id{/yun}selected{yun:}/if{/yun}>{yun:}$v.name{/yun}</option>
											{yun:}/foreach{/yun}
										</select>
									</div>
									<span class="admin_web_tip">网络招聘会参展企业列表展示的展会区域</span>
								</div>
							</td>
						</tr>
						<tr class="admin_table_trbg">
							<th width="120">举办时间：</th>
							<td>
								<div class="layui-inline">
									<div class="layui-input-inline">
										<input type="text" class="layui-input input-text" id="time" name="time" value="{yun:}if $info.starttime||$info.endtime{/yun}{yun:}$info.starttime{/yun} ~ {yun:}$info.endtime{/yun}{yun:}/if{/yun}" placeholder="yyyy-MM-dd HH:mm:ss ~ yyyy-MM-dd HH:mm:ss" lay-key="6" size="60">
									</div>
								</div>
							</td>
						</tr>
						<tr>
							<th width="120">联系电话：</th>
							<td>

								<div class="layui-form-item">
									<div class="layui-input-block">
										<div class="layui-input-inline">
											<input type="text" name="phone" lay-verify="required" placeholder="请输入联系电话" value="{yun:}$info.phone{/yun}" size="60" class="layui-input input-text" onkeyup="this.value=this.value.replace(/[^0-9-]/g,'')">
										</div>
									</div>
								</div>

							</td>
						</tr>
						<tr>
							<th width="120">缩略图：</th>
							<td>
								<button id="noupload" type="button" class="yun_bth_pic" lay-data="{imgid: 'imgicon'}">上传图片</button>
								<img id="imgicon" src="{yun:}$info.pic_n{/yun}" style="width:100px;height:60px;" {yun:}if !$info.pic{/yun}class="none"{yun:}/if{/yun}>
                                	<span class="admin_web_tip">尺寸：195*120px</span>
							</td>
						</tr>
						<tr>
							<th width="120">横幅：</th>
							<td>
								<button id="noupload2" type="button" class="yun_bth_pic" lay-data="{imgid: 'imgbanner'}">上传图片</button>
								<img id="imgbanner" src="{yun:}$info.banner_n{/yun}" style="width:200px;height:100px;" {yun:}if !$info.banner{/yun}class="none"{yun:}/if{/yun}>
                                	<span class="admin_web_tip">尺寸：1920*300px</span>
							</td>
						</tr>
						<tr class="admin_table_trbg">
							<th width="120">顶部滚动标题：</th>
							<td colspan="3"><textarea name="toptitle" class="admin_comdit_textarea">{yun:}$info.toptitle{/yun}</textarea></td>
						</tr>
						<tr>
							<th width="120">招聘会介绍：</th>
							<td>
								<script id="content" name="body" type="text/plain" style="width:820px;height:300px;">{yun:}$info.body{/yun}</script>
							</td>
						</tr>
						<tr class="admin_table_trbg">
							<td align="center" colspan="2">
								{yun:}if is_array($info){/yun}
								<input type="hidden" name="id" value="{yun:}$info.id{/yun}" />
								<input class="layui-btn layui-btn-normal" type="button" onclick="checkform()" value="&nbsp;修 改&nbsp;" />
								{yun:}else{/yun}
								<input class="layui-btn layui-btn-normal" type="button" onclick="checkform()" value="&nbsp;添 加&nbsp;" />
								{yun:}/if{/yun}
								<input class="layui-btn layui-btn-normal" type="reset" name="reset" value="&nbsp;重 置 &nbsp;" />
							</td>
						</tr>
					</table>
					<input type="hidden" name="pytoken" id="pytoken" value="{yun:}$pytoken{/yun}">
				</form>
			</div>
		</div>
		<div id="news_preview" style="display:none;width:560px ">
			<div style="height:300px; overflow:auto;width:560px;">
				<div class="job_box_div" style="text-align:center;margin-top:10px;"></div>
			</div>
		</div>
		{yun:}include file="$adminstyle/checkdomain.htm"{/yun}
		<script language="javascript">
			layui.use(['layer', 'form', 'element', 'laydate', 'upload'], function() {
				var layer = layui.layer
					,form = layui.form
					,element = layui.element
					,upload = layui.upload
					,$ = layui.$;
				var laydate = layui.laydate;
				//时间选择器
				laydate.render({
					elem: '#time',
					type: 'datetime',
					range: '~'
				});
				var layaccept = 'images', layexts = 'jpg|png|gif|bmp|jpeg';
				upload.render({
					elem: '#noupload'
					,auto: false
					,bindAction: '#test9'   //触发上传的对象，暂未用到
					,accept: layaccept
					,exts: layexts
					,field:'sl'
					,choose: function(obj){
						var imgid = this.imgid;
						obj.preview(function(index, file, result){
							if(imgid && $('#'+imgid).length>0){
								$('#'+imgid).removeClass('none');
								$('#'+imgid).attr('src', result); //图片链接（base64）
							}
						});
					}
				});
				upload.render({
					elem: '#noupload2'
					,auto: false
					,bindAction: '#test9'   //触发上传的对象，暂未用到
					,accept: layaccept
					,exts: layexts
					,field:'hf'
					,choose: function(obj){
						var imgid = this.imgid;
						obj.preview(function(index, file, result){
							if(imgid && $('#'+imgid).length>0){
								$('#'+imgid).removeClass('none');
								$('#'+imgid).attr('src', result); //图片链接（base64）
							}
						});
					}
				});
			});
			UE.getEditor('content', {
				toolbars: [
					['Source', '|', 'Undo', 'Redo', 'Bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'fontfamily',
						'fontsize', 'forecolor', 'backcolor', 'removeformat', 'autotypeset', 'pasteplain', '|', 'insertorderedlist',
						'insertunorderedlist', 'selectall', 'cleardoc', '|', 'simpleupload', '|', 'link', 'unlink', 'indent', '|',
						'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify'
					]
				],
				wordCount: false,
				elementPathEnabled: false,
				initialFrameHeight: 300
			});
		</script>
	</body>
</html>
